package com.zretc.emptraining.serviceimpl;

import java.util.List;

import com.zretc.emptraining.dao.TeacherEvaDao;
import com.zretc.emptraining.daoimpl.TeacherEvaDaoImpl;
import com.zretc.emptraining.dbtools.PageData;
import com.zretc.emptraining.entity.Teach;
import com.zretc.emptraining.entity.TeacherEva;
import com.zretc.emptraining.service.TeacherEvaService;

public class TeacherEvaServiceImpl implements TeacherEvaService{
	//创建dao对象
	TeacherEvaDao teacherEvaDao = new TeacherEvaDaoImpl(); 

	@Override
	public boolean addTeacherEva(TeacherEva teacherEva) {
	
		return teacherEvaDao.addTeacherEva(teacherEva);
	}

	@Override
	public List<TeacherEva> getTeacherEvaAll() {
	
		return teacherEvaDao.getTeacherEvaAll();
	}

	@Override
	public PageData<TeacherEva> getTeacherEvaByCourseName(int page, int pageSize, String courseName) {
		if(page < 1) {
			page = 1;
		}
		return teacherEvaDao.getTeacherEvaByCourseName(page, pageSize, courseName);
	}
	
	@Override
	public PageData<TeacherEva> getTeacherEvaByTeacherName(int page, int pageSize, String teacherName) {
		if(page < 1) {
			page = 1;
		}
		return teacherEvaDao.getTeacherEvaByTeacherName(page, pageSize, teacherName);
	}
	
	@Override
	public List<TeacherEva> doTeacherEva(int empNo, int cpNo) {
		return teacherEvaDao.doTeacherEva(empNo, cpNo);
	}
	
	@Override
	public PageData<TeacherEva> getTeacherEvaByPage(int page, int pageSize, String empNoQuery) {
		if(page < 1) {
			page = 1;
		}
		return teacherEvaDao.getTeacherEvaByPage(page, pageSize, empNoQuery);
	}
	
	@Override
	public PageData<Teach> getTeacherEvaShow(int page, int pageSize) {
		if(page < 1) {
			page = 1;
		}
		return teacherEvaDao.getTeacherEvaShow(page, pageSize);
	}

}
